import {Context} from 'koa';

export const corsHandler = {
  origin:function(ctx:Context){
    return '*'; // 所有的域都可以跨域
  },
  maxAge : 5*24*60*60,
  allowMethods:['GET','POST','DELETE','OPTIONS','PUT','PATCH'],
  allowHeaders:['Content-Type','Authorization','token','Accept','X-Requestd-With']
};